package com.biluo.mvs.di

import com.biluo.mvs.network.PaymentApi
import com.biluo.mvs.network.TicketApi
import com.biluo.mvs.network.VehicleOwnerApi
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

@InstallIn(SingletonComponent::class)
@Module
class ApiServiceModule {

    @Provides
    @Singleton
    fun VehicleOwnerApi(retrofit: Retrofit): VehicleOwnerApi = retrofit.create(VehicleOwnerApi::class.java)

    @Provides
    @Singleton
    fun TicketApi(retrofit: Retrofit): TicketApi = retrofit.create(TicketApi::class.java)

    @Provides
    @Singleton
    fun PaymentApi(retrofit: Retrofit): PaymentApi = retrofit.create(PaymentApi::class.java)
}